-
Notifications
You must be signed in to change notification settings - Fork 1.9k
docs: Native Stack - headerBackButtonMenuEnabled #1352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Native Stack - headerBackButtonMenuEnabled #1352
Conversation
✅ Deploy Preview for react-navigation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary to split these files into separate folder, even worse having a separate folder for a singular image eg. headerBackTitle/headerBackTitle.jpeg
. A better approach is to have it all in a single native-stack
folder and using names for files that group them well.
export function NativeStack() { | ||
return ( | ||
<Stack.Navigator> | ||
<Stack.Screen | ||
name="NewsFeed" | ||
component={NewsFeedScreen} | ||
options={{ | ||
title: 'Feed', | ||
headerBackTitle: 'Back title example', | ||
headerBackTitleStyle: { | ||
fontSize: 14, | ||
fontFamily: 'Georgia', | ||
}, | ||
}} | ||
/> | ||
</Stack.Navigator> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to put a full example here you'd also have to add Static API (your example is in Dynamic API) see https://reactnavigation.org/docs/7.x/native-stack-navigator#usage for reference
Here. maybe a simpler example would also work just fine?
export function NativeStack() { | |
return ( | |
<Stack.Navigator> | |
<Stack.Screen | |
name="NewsFeed" | |
component={NewsFeedScreen} | |
options={{ | |
title: 'Feed', | |
headerBackTitle: 'Back title example', | |
headerBackTitleStyle: { | |
fontSize: 14, | |
fontFamily: 'Georgia', | |
}, | |
}} | |
/> | |
</Stack.Navigator> | |
); | |
} | |
headerBackTitleStyle: { | |
fontSize: 14, | |
fontFamily: 'Georgia', | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect!
React Navigation, Native Stack, v7.x
headerBackTitle
,headerBackTitleStyle
,headerBackButtonMenuEnabled